/**
 * @Time    : 2022/2/11 21:03
 * @Author  : WanRongJia
 * @License : Software business license
 * @Site    : www.rich-f.com
 * @File    : element.js
 * @Software: Rich Web Platform
 * @Function: 调用element plus 插件
 * @Version : 1.0
 **/

import ElementPlus from 'element-plus'
import { createI18n } from 'vue-i18n'
import 'element-plus/theme-chalk/index.css'
import localeZH from 'element-plus/lib/locale/lang/zh-cn'
import localeEN from 'element-plus/lib/locale/lang/en'
import messages from '../utils/i18n'

const i18n = createI18n({
  locale: localeZH.name,
  fallbackLocale: localeEN.name,
  messages
})

export default (app) => {
  app.use(ElementPlus, { locale: localeZH, zIndex: 3000, size: 'default' })
  app.use(i18n)
}
